#include "GunEnemyData.h"




void GunEnemyData::initSprite()
{
	sprites = new Sprites(rect);
	sprites->addSprite(_STATE_MAP_STAGE3_GUN_ENEMY_1, _ID_MAP_STAGE3_GUN_ENEMY_1, 60);
	sprites->setState(_STATE_MAP_STAGE3_GUN_ENEMY_1);
}

GunEnemyData::GunEnemyData(int id, int type, double x, double y)
{
	this->id = id; 
	this->type = type;
	this->rect = new Rect(x, y, _OBS_GUN_ENEMY_3_HEIGHT, _OBS_GUN_ENEMY_3_WIDTH);
	this->rect->Vx = this->rect->Vy = 0;
	this->delayForShoot = 3;
	this->delayBeforeShoot = 10;
	this->initData();
}

void GunEnemyData::initBulletContainer()
{
	bulletContainer = new BulletContainer(targetRect, BulletArmy);
	bulletContainer->updateData(400, 200, 1, _ID_BULLET_LEVEL_2);
}

void GunEnemyData::initSpriteHandler(LPD3DXSPRITE spritehandler)
{
	sprites->initSpriteHandler(spritehandler);
}

void GunEnemyData::initData()
{
	this->initSprite();
	this->initBulletContainer();
}
